package com.example.demo.mapper;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;


@Mapper
public interface UserMapper extends BaseMapper<User> {

    @Select("select * from user_info where user_id=#{id}")
    public User getUserById(Integer id);
    @Select("select * from user_info where gender=#{gender} and sexualOrien=#{sexualOrien}")
    public List<User> getUserBySxOri(String gender,String sexualOrien);
    @Select("select * from user_info where username=#{username}")
    public User getUserByName(String username);
}
